Integrand size = 10, antiderivative size = 42 \[ \int \left (1+\sec ^2(x)\right )^{3/2} \, dx=2 \text {arcsinh}\left (\frac {\tan (x)}{\sqrt {2}}\right )+\arctan \left (\frac {\tan (x)}{\sqrt {2+\tan ^2(x)}}\right )+\frac {1}{2} \tan (x) \sqrt {2+\tan ^2(x)} \]
2*arcsinh(1/2*2^(1/2)*tan(x))+arctan(tan(x)/(2+tan(x)^2)^(1/2))+1/2*(2+tan (x)^2)^(1/2)*tan(x)
Result contains complex when optimal does not.
Time = 0.24 (sec) , antiderivative size = 109, normalized size of antiderivative = 2.60 \[ \int \left (1+\sec ^2(x)\right )^{3/2} \, dx=\frac {\left (1+\cos ^2(x)\right ) \sec (x) \sqrt {1+\sec ^2(x)} \left (4 \sqrt {2} \text {arctanh}\left (\frac {\sqrt {2} \sin (x)}{\sqrt {3+\cos (2 x)}}\right ) \cos ^2(x)-2 i \sqrt {2} \cos ^2(x) \log \left (\sqrt {3+\cos (2 x)}+i \sqrt {2} \sin (x)\right )+\sqrt {3+\cos (2 x)} \sin (x)\right )}{(3+\cos (2 x))^{3/2}} \]
((1 + Cos[x]^2)*Sec[x]*Sqrt[1 + Sec[x]^2]*(4*Sqrt[2]*ArcTanh[(Sqrt[2]*Sin[ x])/Sqrt[3 + Cos[2*x]]]*Cos[x]^2 - (2*I)*Sqrt[2]*Cos[x]^2*Log[Sqrt[3 + Cos [2*x]] + I*Sqrt[2]*Sin[x]] + Sqrt[3 + Cos[2*x]]*Sin[x]))/(3 + Cos[2*x])^(3 /2)
Time = 0.20 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.800, Rules used = {3042, 4616, 318, 27, 398, 222, 291, 216}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \left (\sec ^2(x)+1\right )^{3/2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (\sec (x)^2+1\right )^{3/2}dx\) |
\(\Big \downarrow \) 4616 |
\(\displaystyle \int \frac {\left (\tan ^2(x)+2\right )^{3/2}}{\tan ^2(x)+1}d\tan (x)\) |
\(\Big \downarrow \) 318 |
\(\displaystyle \frac {1}{2} \int \frac {2 \left (2 \tan ^2(x)+3\right )}{\left (\tan ^2(x)+1\right ) \sqrt {\tan ^2(x)+2}}d\tan (x)+\frac {1}{2} \sqrt {\tan ^2(x)+2} \tan (x)\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \int \frac {2 \tan ^2(x)+3}{\left (\tan ^2(x)+1\right ) \sqrt {\tan ^2(x)+2}}d\tan (x)+\frac {1}{2} \sqrt {\tan ^2(x)+2} \tan (x)\) |
\(\Big \downarrow \) 398 |
\(\displaystyle 2 \int \frac {1}{\sqrt {\tan ^2(x)+2}}d\tan (x)+\int \frac {1}{\left (\tan ^2(x)+1\right ) \sqrt {\tan ^2(x)+2}}d\tan (x)+\frac {1}{2} \sqrt {\tan ^2(x)+2} \tan (x)\) |
\(\Big \downarrow \) 222 |
\(\displaystyle \int \frac {1}{\left (\tan ^2(x)+1\right ) \sqrt {\tan ^2(x)+2}}d\tan (x)+2 \text {arcsinh}\left (\frac {\tan (x)}{\sqrt {2}}\right )+\frac {1}{2} \tan (x) \sqrt {\tan ^2(x)+2}\) |
\(\Big \downarrow \) 291 |
\(\displaystyle \int \frac {1}{\frac {\tan ^2(x)}{\tan ^2(x)+2}+1}d\frac {\tan (x)}{\sqrt {\tan ^2(x)+2}}+2 \text {arcsinh}\left (\frac {\tan (x)}{\sqrt {2}}\right )+\frac {1}{2} \tan (x) \sqrt {\tan ^2(x)+2}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle 2 \text {arcsinh}\left (\frac {\tan (x)}{\sqrt {2}}\right )+\arctan \left (\frac {\tan (x)}{\sqrt {\tan ^2(x)+2}}\right )+\frac {1}{2} \tan (x) \sqrt {\tan ^2(x)+2}\) |
2*ArcSinh[Tan[x]/Sqrt[2]] + ArcTan[Tan[x]/Sqrt[2 + Tan[x]^2]] + (Tan[x]*Sq rt[2 + Tan[x]^2])/2
3.3.55.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[Rt[b, 2]*(x/Sqrt [a])]/Rt[b, 2], x] /; FreeQ[{a, b}, x] && GtQ[a, 0] && PosQ[b]
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst [Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[d*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q - 1)/(b*(2*(p + q) + 1))), x] + S imp[1/(b*(2*(p + q) + 1)) Int[(a + b*x^2)^p*(c + d*x^2)^(q - 2)*Simp[c*(b *c*(2*(p + q) + 1) - a*d) + d*(b*c*(2*(p + 2*q - 1) + 1) - a*d*(2*(q - 1) + 1))*x^2, x], x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b*c - a*d, 0] && G tQ[q, 1] && NeQ[2*(p + q) + 1, 0] && !IGtQ[p, 1] && IntBinomialQ[a, b, c, d, 2, p, q, x]
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*Sqrt[(c_) + (d_.)*(x_)^2]) , x_Symbol] :> Simp[f/b Int[1/Sqrt[c + d*x^2], x], x] + Simp[(b*e - a*f)/ b Int[1/((a + b*x^2)*Sqrt[c + d*x^2]), x], x] /; FreeQ[{a, b, c, d, e, f} , x]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f Subst[Int[(a + b + b*ff^2*x^2)^p /(1 + ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && NeQ[a + b, 0] && NeQ[p, -1]
Leaf count of result is larger than twice the leaf count of optimal. \(188\) vs. \(2(35)=70\).
Time = 8.05 (sec) , antiderivative size = 189, normalized size of antiderivative = 4.50
method | result | size |
default | \(\frac {\sqrt {2}\, \cos \left (x \right ) \left (\sin \left (x \right ) \cos \left (x \right ) \sqrt {\frac {\cos \left (x \right )^{2}+1}{\left (\cos \left (x \right )+1\right )^{2}}}+2 \cos \left (x \right )^{2} \arctan \left (\frac {\sin \left (x \right )}{\left (\cos \left (x \right )+1\right ) \sqrt {\frac {\cos \left (x \right )^{2}+1}{\left (\cos \left (x \right )+1\right )^{2}}}}\right )-2 \cos \left (x \right )^{2} \operatorname {arctanh}\left (\frac {\sin \left (x \right )-2}{\left (\cos \left (x \right )+1\right ) \sqrt {\frac {\cos \left (x \right )^{2}+1}{\left (\cos \left (x \right )+1\right )^{2}}}}\right )-2 \cos \left (x \right )^{2} \operatorname {arctanh}\left (\frac {\sin \left (x \right )+2}{\left (\cos \left (x \right )+1\right ) \sqrt {\frac {\cos \left (x \right )^{2}+1}{\left (\cos \left (x \right )+1\right )^{2}}}}\right )+\sqrt {\frac {\cos \left (x \right )^{2}+1}{\left (\cos \left (x \right )+1\right )^{2}}}\, \sin \left (x \right )\right ) \sqrt {2+2 \sec \left (x \right )^{2}}\, \left (1+\sec \left (x \right )^{2}\right )}{4 \sqrt {\frac {\cos \left (x \right )^{2}+1}{\left (\cos \left (x \right )+1\right )^{2}}}\, \left (\cos \left (x \right )+1\right ) \left (\cos \left (x \right )^{2}+1\right )}\) | \(189\) |
1/4*2^(1/2)*cos(x)*(sin(x)*cos(x)*((cos(x)^2+1)/(cos(x)+1)^2)^(1/2)+2*cos( x)^2*arctan(sin(x)/(cos(x)+1)/((cos(x)^2+1)/(cos(x)+1)^2)^(1/2))-2*cos(x)^ 2*arctanh((sin(x)-2)/(cos(x)+1)/((cos(x)^2+1)/(cos(x)+1)^2)^(1/2))-2*cos(x )^2*arctanh((sin(x)+2)/(cos(x)+1)/((cos(x)^2+1)/(cos(x)+1)^2)^(1/2))+((cos (x)^2+1)/(cos(x)+1)^2)^(1/2)*sin(x))*(2+2*sec(x)^2)^(1/2)*(1+sec(x)^2)/((c os(x)^2+1)/(cos(x)+1)^2)^(1/2)/(cos(x)+1)/(cos(x)^2+1)
Leaf count of result is larger than twice the leaf count of optimal. 160 vs. \(2 (35) = 70\).
Time = 0.26 (sec) , antiderivative size = 160, normalized size of antiderivative = 3.81 \[ \int \left (1+\sec ^2(x)\right )^{3/2} \, dx=\frac {\arctan \left (\frac {\sqrt {\frac {\cos \left (x\right )^{2} + 1}{\cos \left (x\right )^{2}}} \cos \left (x\right )^{3} \sin \left (x\right ) + \cos \left (x\right ) \sin \left (x\right )}{\cos \left (x\right )^{4} + \cos \left (x\right )^{2} - 1}\right ) \cos \left (x\right ) - \arctan \left (\frac {\sin \left (x\right )}{\cos \left (x\right )}\right ) \cos \left (x\right ) + 2 \, \cos \left (x\right ) \log \left (\cos \left (x\right )^{2} + \cos \left (x\right ) \sin \left (x\right ) + {\left (\cos \left (x\right )^{2} + \cos \left (x\right ) \sin \left (x\right )\right )} \sqrt {\frac {\cos \left (x\right )^{2} + 1}{\cos \left (x\right )^{2}}} + 1\right ) - 2 \, \cos \left (x\right ) \log \left (\cos \left (x\right )^{2} - \cos \left (x\right ) \sin \left (x\right ) + {\left (\cos \left (x\right )^{2} - \cos \left (x\right ) \sin \left (x\right )\right )} \sqrt {\frac {\cos \left (x\right )^{2} + 1}{\cos \left (x\right )^{2}}} + 1\right ) + \sqrt {\frac {\cos \left (x\right )^{2} + 1}{\cos \left (x\right )^{2}}} \sin \left (x\right )}{2 \, \cos \left (x\right )} \]
1/2*(arctan((sqrt((cos(x)^2 + 1)/cos(x)^2)*cos(x)^3*sin(x) + cos(x)*sin(x) )/(cos(x)^4 + cos(x)^2 - 1))*cos(x) - arctan(sin(x)/cos(x))*cos(x) + 2*cos (x)*log(cos(x)^2 + cos(x)*sin(x) + (cos(x)^2 + cos(x)*sin(x))*sqrt((cos(x) ^2 + 1)/cos(x)^2) + 1) - 2*cos(x)*log(cos(x)^2 - cos(x)*sin(x) + (cos(x)^2 - cos(x)*sin(x))*sqrt((cos(x)^2 + 1)/cos(x)^2) + 1) + sqrt((cos(x)^2 + 1) /cos(x)^2)*sin(x))/cos(x)
\[ \int \left (1+\sec ^2(x)\right )^{3/2} \, dx=\int \left (\sec ^{2}{\left (x \right )} + 1\right )^{\frac {3}{2}}\, dx \]
\[ \int \left (1+\sec ^2(x)\right )^{3/2} \, dx=\int { {\left (\sec \left (x\right )^{2} + 1\right )}^{\frac {3}{2}} \,d x } \]
\[ \int \left (1+\sec ^2(x)\right )^{3/2} \, dx=\int { {\left (\sec \left (x\right )^{2} + 1\right )}^{\frac {3}{2}} \,d x } \]
Timed out. \[ \int \left (1+\sec ^2(x)\right )^{3/2} \, dx=\int {\left (\frac {1}{{\cos \left (x\right )}^2}+1\right )}^{3/2} \,d x \]